<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:t="http://myfaces.apache.org/tomahawk">
<body>
<ui:composition template="../template/adminTemplate.jsp">
	<ui:define name="title">
		List Trips
	</ui:define>
	<ui:define name="body">
		<h:form>
			<t:dataTable value="#{listTripBacking.allTrips}" var="trip" id="tripList"
			rowClasses="list-row-even, list-row-odd">
				<h:column>
					<f:facet name="header">
						<h:outputText value="Trip" />
					</f:facet>
					<h:outputText value="#{trip.title}" />
				</h:column>
				<h:column>
					<f:facet name="header">
						<h:outputText value="Description" />
					</f:facet>
					<h:outputText value="#{trip.description}" />
				</h:column>
				<h:column>
					<f:facet name="header">
						<h:outputText value="Start Date" />
					</f:facet>
					<h:outputText value="#{trip.startDate}" />
				</h:column>
				<h:column>
					<f:facet name="header">
						<h:outputText value="End Date" />
					</f:facet>
					<h:outputText value="#{trip.endDate}" />
				</h:column>
				<h:column>
					<f:facet name="header">
						<h:outputText value="Data" />
					</f:facet>
					<h:commandLink id="uploadDataLink" action="#{listTripBacking.uploadData}">
						<h:outputText value="upload data" />
					</h:commandLink>
				</h:column>
				<h:column>
					<f:facet name="header">
						<h:outputText value="Data" />
					</f:facet>
					<a target="_blank" href="/tt-jsf/trip/view/#{trip.user.username}/#{trip.key}">show map</a>
				</h:column>
			</t:dataTable>
		</h:form>
	</ui:define>
</ui:composition>
</body>
</html>
